package com.aispeech.task.common.handler;

import com.aispeech.task.common.data.domain.Task;
import com.aispeech.task.common.data.enums.APICode;
import com.aispeech.task.common.exceptions.TaskException;

import java.util.List;
import java.util.Map;

public interface TaskManager {
    void updateProgress(Task task, int progress) throws TaskException;

    void finishTask(Task task, List<Map> result) throws TaskException;

    void breakTask(Task task, APICode code) throws TaskException;

    void breakTask(Task task, int code, String message) throws TaskException;
}
